(()=>{"use strict";var e,t={9780:(e,t,n)=>{n(65677);var r=o(n(66694)),a=o(n(79674)),l=n(96403);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=u(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,o=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){i=!0,l=e},f:function(){try{o||null==n.return||n.return()}finally{if(i)throw l}}}}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){var n,r,a,l=i(document.cookie.split("; "));try{for(l.s();!(n=l.n()).done;){var o=(r=n.value.split("="),a=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,l,o,i=[],u=!0,c=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=l.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){c=!0,a=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw a}}return i}}(r,a)||u(r,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=o[0],f=o[1];if("Scr1wCTFdLanguage"===c)return"en"===decodeURIComponent(f)?e:t}}catch(e){l.e(e)}finally{l.f()}return t}function d(e){var t=(0,a.default)("input[data-challenge-id]:checked").map((function(){return(0,a.default)(this).data("challenge-id")})),n=1===t.length?"challenge":"challenges";(0,l.ezQuery)({title:f("Delete Challenges","删除题目"),body:f("Are you sure you want to delete ".concat(t.length," ").concat(n,"?"),"你确定要删除".concat(t.length,"个题目吗")),success:function(){var e,n=[],a=i(t);try{for(a.s();!(e=a.n()).done;){var l=e.value;n.push(r.default.fetch("/api/v1/challenges/".concat(l),{method:"DELETE"}))}}catch(e){a.e(e)}finally{a.f()}Promise.all(n).then((function(e){window.location.reload()}))}})}function s(e){var t=(0,a.default)("input[data-challenge-id]:checked").map((function(){return(0,a.default)(this).data("challenge-id")}));(0,l.ezAlert)({title:f("Edit Challenges","编辑题目"),body:(0,a.default)(f('\n    <form id="challenges-bulk-edit">\n      <div class="form-group">\n        <label>Category</label>\n        <input type="text" name="category" data-initial="" value="">\n      </div>\n      <div class="form-group">\n        <label>Subcategory</label>\n        <input type="text" name="subcategory" data-initial="" value="">\n      </div>\n      <div class="form-group">\n        <label>Value</label>\n        <input type="number" name="value" data-initial="" value="">\n      </div>\n      <div class="form-group">\n        <label>State</label>\n        <select name="state" data-initial="">\n          <option value="">--</option>\n          <option value="visible">Visible</option>\n          <option value="hidden">Hidden</option>\n        </select>\n      </div>\n    </form>\n    ','\n    <form id="challenges-bulk-edit">\n      <div class="form-group">\n        <label>类别</label>\n        <input type="text" name="category" data-initial="" value="">\n      </div>\n      <div class="form-group">\n        <label>子类别</label>\n        <input type="text" name="subcategory" data-initial="" value="">\n      </div>\n      <div class="form-group">\n        <label>分值</label>\n        <input type="number" name="value" data-initial="" value="">\n      </div>\n      <div class="form-group">\n        <label>状态</label>\n        <select name="state" data-initial="">\n          <option value="">--</option>\n          <option value="visible">可见</option>\n          <option value="hidden">隐藏</option>\n        </select>\n      </div>\n    </form>')),button:f("Submit","提交"),success:function(){var e,n=(0,a.default)("#challenges-bulk-edit").serializeJSON(!0),l=[],o=i(t);try{for(o.s();!(e=o.n()).done;){var u=e.value;l.push(r.default.fetch("/api/v1/challenges/".concat(u),{method:"PATCH",body:JSON.stringify(n)}))}}catch(e){o.e(e)}finally{o.f()}Promise.all(l).then((function(e){window.location.reload()}))}})}(0,a.default)((function(){(0,a.default)("#challenges-delete-button").click(d),(0,a.default)("#challenges-edit-button").click(s)}))},65677:(e,t,n)=>{var r=v(n(66694)),a=v(n(79674)),l=v(n(71350));n(76528),n(47585);var o=v(n(90146)),i=v(n(82786)),u=n(54830),c=v(n(90840)),f=v(n(40710)),d=v(n(64524)),s=v(n(55046));function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}l.default.extend(o.default),"en"===function(e){var t,n,r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=y(e))){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,o=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){i=!0,l=e},f:function(){try{o||null==n.return||n.return()}finally{if(i)throw l}}}}(document.cookie.split("; "));try{for(a.s();!(t=a.n()).done;){var l=(n=t.value.split("="),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,l,o,i=[],u=!0,c=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=l.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){c=!0,a=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw a}}return i}}(n,r)||y(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=l[0],i=l[1];if("Scr1wCTFdLanguage"===o)return decodeURIComponent(i)}}catch(e){a.e(e)}finally{a.f()}return null}()?l.default.locale("en"):l.default.locale("zh-cn"),r.default.init(window.init),window.CTFd=r.default,window.helpers=s.default,window.$=a.default,window.dayjs=l.default,window.nunjucks=i.default,window.Howl=u.Howl,(0,a.default)((function(){(0,d.default)(),(0,f.default)(),(0,c.default)(r.default.config.urlRoot)}))}},n={};function r(e){var a=n[e];if(void 0!==a)return a.exports;var l=n[e]={id:e,loaded:!1,exports:{}};return t[e](l,l.exports,r),l.loaded=!0,l.exports}r.m=t,e=[],r.O=(t,n,a,l)=>{if(!n){var o=1/0;for(f=0;f<e.length;f++){for(var[n,a,l]=e[f],i=!0,u=0;u<n.length;u++)(!1&l||o>=l)&&Object.keys(r.O).every((e=>r.O[e](n[u])))?n.splice(u--,1):(i=!1,l<o&&(o=l));if(i){e.splice(f--,1);var c=a();void 0!==c&&(t=c)}}return t}l=l||0;for(var f=e.length;f>0&&e[f-1][2]>l;f--)e[f]=e[f-1];e[f]=[n,a,l]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.j=33,(()=>{var e={33:0,671:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var a,l,[o,i,u]=n,c=0;if(o.some((t=>0!==e[t]))){for(a in i)r.o(i,a)&&(r.m[a]=i[a]);if(u)var f=u(r)}for(t&&t(n);c<o.length;c++)l=o[c],r.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return r.O(f)},n=self.webpackChunkctfd=self.webpackChunkctfd||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var a=r.O(void 0,[160,736,694],(()=>r(9780)));a=r.O(a)})();